Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.0] Compute beta platform information for non-symbol documentation #972

Merged

Conversation

anferbui
Copy link
Contributor

@anferbui anferbui commented Jul 4, 2024

Explanation: Fixes an issue where beta badges weren't rendering for non-symbol documentation.
Scope: @Available directive and any article availability derived from the directive.
Issue: rdar://129355087
Risk: Low/Medium. The type of a property has changed (see #959 (comment)), but this applies only to a directive and the rest of the changes are additive.
Testing: Validated by rendering a sample code article with availability information locally, plus unit testing (see PR for more info).
Reviewer: @d-ronnqvist
Original PR: #959

…lang#959)

Fixes a bug where beta platform information was never being derived for non-symbol documentation, such as sample code articles. Sample code articles defined with `@Available` directives were never displaying a beta badge regardless of whether the platform was configured to be a beta platform.

* Use `VersionTriplet` for `@Available` directive
* Compute platform beta status when using `@Available`
* Adds documentation for new `@Available` behavior
* Add unit tests for new `@Available` behaviour
* Add unit tests to `PlatformAvailabilityTests` for beta availability
* Add diagnostic explanation for non-convertible directive arguments
* Revert change to make `isBeta` a `let` property
* Use if-expression to declare variables
* Make assertions in `PlatformAvailabilityTests` clearer
* Make `AvailabilityRenderItem.isBeta(introduced:current:)` private
* Move to using `SemanticVersion` rather than `VersionTriplet`
* Merge "deprecated" parameter changes with SemanticVersion changes
* Update `@Available` documentation

Resolves rdar://129355087.
@anferbui anferbui added the source breaking DocC's public API isn't source compatible with earlier versions label Jul 4, 2024
@anferbui anferbui requested a review from franklinsch July 4, 2024 14:06
@anferbui
Copy link
Contributor Author

anferbui commented Jul 4, 2024

@swift-ci please test

@anferbui anferbui merged commit d49f1ff into swiftlang:release/6.0 Jul 4, 2024
2 checks passed
@anferbui anferbui deleted the 6.0-sample-code-beta-badges branch July 4, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source breaking DocC's public API isn't source compatible with earlier versions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants